package service.impl;

import bean.User;
import dao.UserDao;
import dao.impl.UserDaoImpl;
import service.UserService;

public class UserServiceImpl implements UserService {
    UserDao userDao = new UserDaoImpl();
    @Override
    public User login(String name, String password) {
        return userDao.queryByNameAndPassword(name, password);
    }

    @Override
    public int register(User user) {
        return userDao.insert(user);
    }
}
